#include <bits/stdc++.h>
using namespace std;
int m[21][21][21];
int w(int a,int b,int c){
	if(a<=0||b<=0||c<=0)return 1;
	if(m[a][b][c])return m[a][b][c];
	else if(a<b&&b<c)m[a][b][c]=w(a,b,c-1)+w(a,b-1,c-1)-w(a,b-1,c);
	else m[a][b][c]=w(a-1,b,c)+w(a-1,b-1,c)+w(a-1,b,c-1)-w(a-1,b-1,c-1);
	return m[a][b][c];
}
int main(void){
	memset(m,0,9261*sizeof(int));
	long long int a,b,c;
	sign:
	cin>>a>>b>>c;
	if(a==-1&&b==-1&&c==-1)return 0;
	cout<<"w("<<a<<", "<<b<<", "<<c<<") = ";
	if(a<=0||b<=0||c<=0)cout<<1<<endl;
	else if(a>20||b>20||c>20)cout<<w(20,20,20)<<endl;
	else cout<<w(a,b,c)<<endl;
	goto sign;
}
